<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/white/common/common.jsp"%>
<%@include file="/white/common/taglibs.jsp"%>
<html>
<head>
<script type="text/javascript">
        function displayResult(){
            var result = "<s:property value='result'/>";
            if(result != null && result != ""){
                alert(result);
            }
        }            
            function tosearch(){
            var orderForm=document.getElementById("orderForm");
            orderForm.action='prodOrderAction!orderByPage.action';
            orderForm.submit();
             
            }
            
            function toup(selectedIds){
 	var orderForm=document.getElementById("orderForm");
            orderForm.action="prodOrderAction-"+selectedIds+"!toup.action";     
             orderForm.target="mainframe";     
            orderForm.submit();          
            }
                        function todown(selectedIds){
 	var orderForm=document.getElementById("orderForm");
            orderForm.action="prodOrderAction-"+selectedIds+"!todown.action";   
            orderForm.target="mainframe";         
            orderForm.submit();
          
            }    
            $(document).ready(function() {
	var listorder = document.getElementById("listorder").innerHTML;
if(listorder==1){
document.getElementById('up').style.display="none"; 
}
});
    </script>
</head>
<body onload="displayResult()">
	<s:form method="post" action="prodOrderAction!orderByPage.action"
		theme="simple" id="orderForm">
		<div id="div_title">
			<h3>手工排序</h3>
			<div id="div_search">
				<s:hidden name="query_prodClassCode1" />
				<s:hidden name="query_prodClassCode2" />
			</div>
		</div>
		<div id="div_button">
			<%@include file="/white/common/message.jsp"%>
		</div>
		<!--列表 开始 -->
		<table cellpadding="0" cellspacing="0" class="t_list">
			<tr>
				<th>序号</th>
				<th>一级分类编号</th>
				<th>一级分类名称</th>
				<th>二级分类编号</th>
				<th>二级分类名称</th>
				<th>品牌编号</th>
				<th>品牌名称1</th>
				<th>品牌名称2</th>
				<th>列名次序</th>
				<th>排序</th>
			</tr>
			<s:iterator value="resultList" status="sindex">
				<tr>
					<td>${sindex.count}</td>
					<td><s:property value="PROD_CLASS_CODE1" /></td>
					<td><s:property value="PROD_CLASS_NAME1" /></td>
					<td><s:property value="PROD_CLASS_CODE2" /></td>
					<td><s:property value="PROD_CLASS_NAME2" /></td>
					<td><s:property value="GROUP_ID" /></td>
					<td><s:property value="NAME1" /></td>
					<td><s:property value="NAME2" /></td>
					<td>
						<div id="listorder">
							<s:property value="LIST_ORDER" />
						</div>
					</td>
					<td><input type="button" value="上移" id="up"
						onclick="toup('${ID}');disabled=true;" class="input_button" /> <input
						type="button" id="down" value="下移"
						onClick="todown('${ID}');disabled=true;" class="input_button" /></td>
				</tr>
			</s:iterator>
		</table>
		<s:if test="resultList.size() > 0">
			<table border="0" cellspacing="0" cellpadding="0" class="t_bottom">
				<tr>
					<td><%@include file="/white/common/pageList.jsp"%></td>
				</tr>
			</table>
		</s:if>
	</s:form>
</body>
</html>
